import 'package:dio/dio.dart';
import 'package:sainbainu/common/http/http.dart';

class AccountApi {
  /// 修改密码
  Future<Map<String, dynamic>> setPasswd(Map data) async {
    Response res = await Http.post('/api/customer/set_passwd', data: data);
    return res.data;
  }

  /// 绑定手机号
  Future<Map<String, dynamic>> bindMobile(Map data) async {
    Response res = await Http.post('/api/customer/bind_mobile', data: data);
    return res.data;
  }

  /// 实名认证
  Future<Map<String, dynamic>> realAuth(Map data) async {
    Response res = await Http.post('/api/customer/check_real', data: data);
    return res.data;
  }

  /// 官方认证
  Future<Map<String, dynamic>> officialAuth(Map data) async {
    Response res = await Http.post('/api/customer/check_official', data: data);
    return res.data;
  }

  /// 我的账号信息
  Future<Map<String, dynamic>> myAccountInfo() async {
    Response res = await Http.get('/api/customer/account_info');
    return res.data;
  }

  /// 绑定微信
  Future<Map<String, dynamic>> bindWechat(Map data) async {
    Response res = await Http.post('/api/customer/bind_wx', data: data);
    return res.data;
  }

  /// 解绑微信
  Future<Map<String, dynamic>> unBindWechat() async {
    Response res = await Http.post('/api/customer/unbind_wx');
    return res.data;
  }

  /// 绑定apple
  Future<Map<String, dynamic>> bindApple(Map data) async {
    Response res = await Http.post('/api/customer/bind_apple', data: data);
    return res.data;
  }

  /// 解绑apple
  Future<Map<String, dynamic>> unBindApple() async {
    Response res = await Http.post('/api/customer/unbind_apple');
    return res.data;
  }
}
